add raph@gimp.org's fix to the jpeg indexing routine
authorLarry Ewing <lewing@gimp.org>
Thu, 15 Jul 1999 06:42:42 +0000 (06:42 +0000)
committerLarry Ewing <lewing@src.gnome.org>
Thu, 15 Jul 1999 06:42:42 +0000 (06:42 +0000)
1999-07-15  Larry Ewing  <lewing@gimp.org>

* src/io-jpeg.c (image_load): add raph@gimp.org's fix to the jpeg
indexing routine

* src/testpixbuf.c (main): fix up the file routines a little so
that you can load multiple files given the file names

demos/testpixbuf.c
gdk-pixbuf/ChangeLog
gdk-pixbuf/io-jpeg.c

index 488890bc87b44aeaf6c73b90c97f2eb1c3135721..27a09757741dcaf60c3e525530e14776fc45a8e4 100644 (file)
@@ -122,6 +122,9 @@ new_testrgb_window (GdkPixBuf *pixbuf)
 int
 main (int argc, char **argv)
 {
+  int i;
+  int found_valid = FALSE; 
+
   GdkPixBuf *pixbuf;
 
   gtk_init (&argc, &argv);
@@ -132,11 +135,24 @@ main (int argc, char **argv)
 
   gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
   gtk_widget_set_default_visual (gdk_rgb_get_visual ());
-  pixbuf = gdk_pixbuf_load_image ("test.gif");
-
-  new_testrgb_window (pixbuf);
 
-  gtk_main ();
+  i = 1;
+  for (i = 1; i < argc; i++)
+    {
+      if (argv[i])
+       {
+         pixbuf = gdk_pixbuf_load_image (argv[i]);
+   
+         if (pixbuf)
+           {
+             new_testrgb_window (pixbuf);
+             found_valid = TRUE;
+           }
+       }
+    }
+
+  if (found_valid)
+    gtk_main ();
 
   return 0;
 }
index 927a3df4e5b7f249a389861a0c04f13a0e90ff90..78de67eafe2d8bb525af6fa6493baadb0444f06c 100644 (file)
@@ -1,3 +1,11 @@
+1999-07-15  Larry Ewing  <lewing@gimp.org>
+
+       * src/io-jpeg.c (image_load): add raph@gimp.org's fix to the jpeg
+       indexing routine
+
+       * src/testpixbuf.c (main): fix up the file routines a little so
+       that you can load multiple files given the file names
+
 1999-07-14  Larry Ewing  <lewing@gimp.org>
 
        * src/testpixbuf.c (expose_func): added an almost proper expose 
index b75155dbd85d8170823bd36605e6b9a3cd523d04..f8ac8139deae39b79e1eb3b4cc3dfeca9dd02949 100644 (file)
@@ -99,7 +99,7 @@ GdkPixBuf *image_load(FILE *f)
                                unsigned char *from, *to;
                                from = lines[i]+w-1;
                                to = lines[i]+w*3-3;
-                               for (j=w-1;j>=0;j++) {
+                               for (j=w-1;j>=0;j--) {
                                        to[0] = from[0];
                                        to[1] = from[0];
                                        to[2] = from[0];
@@ -120,7 +120,7 @@ GdkPixBuf *image_load(FILE *f)
                return NULL;
        pixbuf->ref_count = 0;
        pixbuf->unref_func = NULL;
-
+       
        return pixbuf;
 }